<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require_once __DIR__ . '/AuthenticationUtils.php';
require_once __DIR__.'/../site2/includes/CartMgr.class.php';

if (!AuthenticationUtils::checkSFLogin()) {
    header("location:login.php");
}

if (!isset($_SESSION)) {
    session_start();
}
$_page->set("welcomeMsg", "Welcome ".$_SESSION['customer']->first_name);
$_page->set("displayLogout", "<a href='logout.php'>Logout</a>");
$_page->set("isLogin", true);
$_page->set("rightbar","rightbar.html");

// get current cart
$cartMgr= new CartMgr($dbc);
$uid = AuthenticationUtils::getCurrentCustomer();
$_page->set('cart',$cartMgr->getShoppingCartContents($uid));



